home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / keyb / ak100a.zip / ANSIKEY.DOC next >
Text File  |  1991-04-11  |  14KB  |  314 lines

  1.  
  2.  
  3.                            ANSIKEY, version 1.0a
  4.  
  5.  
  6.                                April 11, 1991
  7.  
  8.  
  9.                  Keyboard function keys redefinition through
  10.                      ANSI.SYS, made a whole lot easier!
  11.  
  12.  
  13.  
  14.  
  15.                        (c) Copyright 1991 by Ping Huang,
  16.                               All Rights Reserved
  17.  
  18.  
  19.  
  20.         PLEASE READ THIS!
  21.         -----------------
  22.  
  23.         I assume absolutely no legal or moral responsibility for any
  24.         damages which may result in any way from the use of this
  25.         program, nor do I make any guarantees as to its suitability for
  26.         your particular needs. Your choice to make use of this program
  27.         constitutes agreement with these terms. However, if you do
  28.         encounter problems, please drop me a line. I welcome any
  29.         comments, compliments, suggestions, *JOB*OFFERS*, etc. If you
  30.         like the program, and/or if it proves useful to you, read about
  31.         the Shareware concept.
  32.  
  33.         You are hereby granted permission to make use of this software
  34.         ONLY AS LONG AS IT TAKES TO EVALUATE ITS SUITABILITY FOR YOUR
  35.         PURPOSES. Use after the trial period is an infringement on my
  36.         rights unless you have registered with me. Feel free to upload
  37.         to any BBS's you frequent (and even those you don't) or
  38.         distribute to other users in other ways, on the conditions that:
  39.         (1) you make no modifications to the software or docs without
  40.         express written permission; (2) all files related to this
  41.         program that you received, you are passing along, preferably in
  42.         the form ANSIKEY.ZIP; (3) it is not bundled with a commercial
  43.         package (unless prior arrangements have been made); (4) if disk
  44.         copying and handling charges are levied in the distribution of
  45.         this program, they MUST be $5 or less. [Flame: I'm sick tired of
  46.         dealers who charge $7-8 for disks that are nearly empty!]
  47.  
  48.         If you have suggestions, problems, compliments, CONTRIBUTIONS
  49.         (hint,hint), et cetera, contact me:
  50.  
  51.     Addresses to reach me at:
  52.  
  53.         Ping Huang            e-mail: pshuang@athena.mit.edu
  54.         1435 - 26th Avenue        school: 450 Memorial Drive
  55.         San Francisco, CA 94122            Cambridge, MA 02139
  56.  
  57. ===================
  58. PROGRAM DESCRIPTION
  59. ===================
  60.  
  61. ANSIKEY makes it easy to make use of ANSI.SYS which came with your
  62. computer's DOS to redefine certain keys on your keyboard. These
  63. redefinitions (also known as macros) will work at the DOS command prompt
  64. and any program (such as DEBUG and many other command-line based
  65. programs) that uses DOS function calls and not ROM BIOS interrupts for
  66. keyboard input. If that sounded like gobbly-gook to you... if the
  67. program you have in mind has a fancy, full-screen display, then ANSIKEY
  68. probably won't help you, but it won't hurt to try.
  69.  
  70. You probably can think up your own uses for such a capability, but I'll
  71. tell you what kind of things I use it for (and I use it a lot, since I 
  72. wrote the program originally for own use and decided to refine it a bit 
  73. for general consumption).  When I program using Turbo Pascal, and the 
  74. program is too large for me to run it in the IDE shell, I use ANSIKEY to 
  75. define F9 to compile the program with all the compiler switches that 
  76. would be tedious to type over and over again. I program Alt-E to always 
  77. mean EXIT so that after I shell out of a program to execute some DOS 
  78. commands, with a single keystroke I can go back to the application very 
  79. quickly.  I program the other function keys to run programs that are 
  80. hidden deep in the directory structure of my hard disk, like 
  81. C:\FOO\BAR\LAMBDA\TURBO; by doing so I make it easy for me to run them,
  82. but I don't have to include such lengthy directory names in my DOS PATH.
  83.  
  84. =============
  85. PROGRAM USAGE
  86. =============
  87.  
  88.     ANSIKEY [DEF│UND│CLR│ESC│TST] [key scancode] [redefinition text]
  89.  
  90. By default, a brief condensed help screen appears on the screen.
  91.  
  92. THE FIRST PARAMETER
  93. -------------------
  94.  
  95.  ■ DEF defines the key using the following string on the command line.
  96.  ■ UND restores normal use of the key associated with the keycode.
  97.  ■ CLR undos all redef's made using ANSI.SYS and takes no params.
  98.    This may or may not work properly with ANSI.SYS substitutes, notably
  99.    DBLANSI.SYS that comes with the software package DoubleDOS.
  100.  ■ ESC outputs an ANSI command header(ESC+"["), followed by the rest of
  101.    the command line. Use only if you understand ANSI escape sequences.
  102.    You can use this to output ANSI codes that change the colors on your
  103.    screen, for example.
  104.  ■ TST will output the scan code for the next key pressed.
  105.  
  106. After the computer executes your command, the redefinition text will
  107. then be produced by the keystroke represented by the key scancode
  108. entered on the command line; this text may include any IBM-ASCII
  109. character with the exception of those that are translated; see the
  110. translation section of this documentation for more details.
  111.  
  112. ==========================
  113. What is ANSI.SYS, you ask?
  114. ==========================
  115.  
  116. Good question. ANSI.SYS is a device driver, or a special type of
  117. program, that comes with PC/MS-DOS. ANSI stands for American National
  118. Standards Institute; a committee at ANSI created a set of standardized
  119. codes for application programs to control how the screen looks by 
  120. outputting escape sequences, i.e. a stream of characters that are 
  121. preceded by the ESC character. Among the many functions that ANSI.SYS 
  122. provides is a way for keys to be redefined.
  123.  
  124. DOS does not automatically activate ANSI.SYS and load it into memory;
  125. you must explicitly tell DOS to load the device driver into memory from
  126. the ANSI.SYS file. To do this, look in the root directory of the disk
  127. that you regularly boot up your computer from. If there is already a
  128. file there called CONFIG.SYS, you need a text editor to insert this line
  129. (use the appropriate drive letter and directory to the file ANSI.SYS):
  130.  
  131.     DEVICE=[d:][\path\]ANSI.SYS
  132.  
  133. If CONFIG.SYS did not already exist, you should create one. The easy
  134. quickest way to do so is log onto the boot drive and change to the root
  135. directory. Then enter the following commands at the DOS command prompt:
  136.  
  137.     COPY CON \CONFIG.SYS           <ENTER>
  138.     DEVICE=[d:][\path\]ANSI.SYS    <ENTER>
  139.     BUFFERS=30                     <ENTER>
  140.     FILES=30                       <ENTER>
  141.  
  142. Now type Ctrl-Z and a final <ENTER>; you should see the disk light come
  143. on as the computer writes the info you typed into the CONFIG.SYS file.
  144.  
  145. NOTE: The last two lines are not necessary for ANSIKEY to work properly,
  146. but will help to speed up your computer's disk operations.
  147.  
  148.  
  149. =========================
  150. OTHER FEATURES OF ANSIKEY
  151. =========================
  152.  
  153. MNEMONIC ABBREVIATIONS
  154. ----------------------
  155.  
  156. The scan code numbers that represents keys are not easy to remember, and
  157. you shouldn't have to look them up tediously in a table -- that's what
  158. computers are for, after all. Thus, the TST parameter, which will return
  159. the scancode for the next keystroke that you make. However, to make
  160. things even easier, ANSIKEY knows a number of mnemonics for certain keys
  161. for your convenience. Mnemonics must be entered exactly as they appear
  162. below (although upper/lower case doesn't matter):
  163.  
  164.          F1   through  F12             CF1  through  CF12
  165.          SF1  through  SF10            AF1  through  AF10
  166.          A-A  through  A-Z             A1   through  A0
  167.  
  168. The easy way to remember these mnemonics (ironic, isn't it, my telling
  169. you how to remember the mnemonics) is to keep these rules in mind:
  170.  
  171.     F1...F12 represents the function keys, while A...Z and 1...0
  172.     represent the respective keys on the keyboard.
  173.  
  174.     Prefixing a 'A' character, a 'C' character, or a 'S' character means
  175.     that you are referring to the Alt'ed, Ctrl'ed, or Shifted function
  176.     keys. (That is, hold the Alt or Ctrl or Shift key down while
  177.     pressing one of the function keys.)
  178.  
  179.  
  180. CHARACTER SUBSTITUTION
  181. ----------------------
  182.  
  183. ANSIKEY by default will replace certain special characte